<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" type="text/css" href="CSS/style.css">
    <%--<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>--%>
    <script src="${pageContext.request.contextPath}JS\code.jquery.com\jquery-3.6.0.js"></script>

    <script>
        function a1(){
            $.post({
                url:"${pageContext.request.contextPath}/a1",
                data:{'name':$("#txtName").val()},
                success:function (data,status) {
                    alert(data);
                    alert(status);
                }
            });
        }
    </script>
</head>

<body>
<div class="container right-panel-active">
    <!-- 注册 -->
    <div class="container__form container--signin">
        <form action="/MyWeb/user/add" class="form" id="form1" method="get">
            <h2 class="form__title">注册账号</h2>
            <input type="text" placeholder="姓名" class="input" id="userName" name="userName"/>
            <input type="text" placeholder="学号" class="input" id="userName3" name="userName3"/>
            <input type="email" placeholder="邮箱" class="input" id="email" name="email"/>
            <input type="password" placeholder="密码" class="input" id="password" name="password"/>
            <input type="submit" value="点击注册" class="btn"/>
        </form>
    </div>

    <!-- 登录 -->
    <div class="container__form container--signup">
        <form action="/MyWeb/login2" class="form" id="form2" method="get">
            <h2 class="form__title">欢迎登录</h2>
                <input type="text" placeholder="账号" class="input"id="userName2" name="tno" onblur="a1()"/>
                <input type="password" placeholder="密码" class="input" id="password2" name="tpassword"/>
            <a href="#" class="link">忘记密码?</a>

            <input type="submit" class="btn" value="登录"/>
            <a href="User_Add.jsp" class="link">学生登录</a>
        </form>

    </div>

    <!-- 叠加部分 -->
    <div class="container__overlay">
        <div class="overlay">
            <div class="overlay__panel overlay--left">

                <button class="btn" id="signIn"> 没有账号，点击注册</button>
            </div>
            <div class="overlay__panel overlay--right">
                <button class="btn" id="signUp">已有账号，直接登录</button>
            </div>
        </div>
    </div>
</div>
</body>
<script src="JS/script.js"></script>
</html>